<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // 判断一个数是不是奇数 

        var num = 5 ;

        // 假设num是奇数

        var flag = true ;

        // 如果能被2整除 --- 说明假设不成立
        if(num % 2 === 0) {
            flag = false ;
        }


        if(flag === true) {
            console.log('奇数') ;
        }
        else {
            console.log('偶数') ;
        }

    </script>
    
</body>
</html>